home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’92 / Run & Stumpy / source / aevent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-19  |  1.3 KB  |  64 lines  |  [TEXT/MPS ]

  1. #ifndef aevent_h
  2. #define aevent_h
  3.  
  4. #include <appleevents.h>
  5.  
  6. #ifndef inttypes_h
  7. #include "inttypes.h"
  8. #endif
  9. #ifndef errorsource_h
  10. #include "errorsource.h"
  11. #endif
  12. #ifndef aedesc_h
  13. #include "aedesc.h"
  14. #endif
  15.  
  16. class aevent: public aedesc
  17.   {
  18.     private:
  19.         AppleEvent reply;
  20.         AESendMode mode;
  21.         AESendPriority priority;
  22.         uint16 timeout;
  23.         IdleProcPtr idler;
  24.         EventFilterProcPtr filter;
  25.         
  26.     public:
  27.         aevent( AEEventClass theclass,
  28.                   AEEventID id,
  29.                   const AEAddressDesc& target );
  30.                 
  31.         void putparam( AEKeyword, DescType, void *, uint32 size );
  32.         void putparam( AEKeyword, DescType, Handle );
  33.         void putparam( AEKeyword, const AEDesc& );
  34.                 
  35.         OSErr getparam( AEKeyword,
  36.                              DescType desired,
  37.                              DescType& realtype,
  38.                              void *,
  39.                              uint32 maxsize,
  40.                              uint32& truesize );
  41.                 
  42.         OSErr getparam( AEKeyword,
  43.                              DescType desired,
  44.                              DescType& realtype,
  45.                              Handle& );
  46.  
  47.         OSErr getparam( AEKeyword,
  48.                              DescType desired,
  49.                              AEDesc& );
  50.         
  51.         void putattribute( AEKeyword, DescType, void *, uint32 size );
  52.         void putattribute( AEKeyword, DescType, Handle );
  53.         void putattribute( AEKeyword, const AEDesc& );
  54.         
  55.         operator AppleEvent&()            { return (AppleEvent&)*this; }
  56.         
  57.         // there should be methods here to set the send params
  58.         // and access the reply.
  59.         
  60.         OSErr send();
  61.   };
  62.  
  63. #endif aevent_h
  64.